using Game.Networking.Client;
using MemoryPack;

namespace Game.Networking {
	public sealed class S_EntityRPCMessageHandler : BaseServerMessageHandler {
		public override ServerPacketID CommandId {
			get {
				return ServerPacketID.EnityRPC;
			}
		}

		public override void ProcessMessage(byte[] rawCommand) {
			var command = MemoryPackSerializer.Deserialize<S_EntityRPCMessage>(rawCommand);
			ClientEntityController.Instance.CallRPC(command.ID, command.RPCID, command.Data);
		}
	}
}
